package com.qf.java2107.yb.hotel.dao;

import com.qf.java2107.yb.hotel.pojo.Table;

import java.sql.SQLException;
import java.util.List;

/**
 * 餐桌持久层接口
 * @author YB
 * @date 2021/12/16
 * @VERSION V1.0
 **/
public interface TableDao {

    /**
     * 模糊查询
     * @param tableName
     * @return
     * @throws SQLException
     */
    List<Table> findLikeName(String tableName) throws SQLException;

    /**
     * 添加餐桌信息
     * @param table
     * @return
     * @throws SQLException
     */
    int save(Table table) throws SQLException;

    /**
     * 更新餐桌信息
     * @param table
     * @return
     * @throws SQLException
     */
    int update(Table table) throws SQLException;


    /**
     * 根据餐桌Id删除
     * @param tableId
     * @return
     * @throws SQLException
     */
    int delete(Integer tableId) throws SQLException;


}
